import yRequest from '../../index'
import { IDataType } from './type'

enum DashboardAPI {
  categoryGoodsCount = '/goods/category/count',
  categoryGoodsSale = '/goods/category/sale',
  categoryGoodsFavor = '/goods/category/favor',
  addressGoodsSale = '/goods/address/sale'
}
export function categoryGoodsCount() {
  return yRequest.get<IDataType>({
    url: DashboardAPI.categoryGoodsCount,
    showLoading: true
  })
}

export function categoryGoodsSale() {
  return yRequest.get<IDataType>({
    url: DashboardAPI.categoryGoodsSale,
    showLoading: true
  })
}

export function categoryGoodsFavor() {
  return yRequest.get<IDataType>({
    url: DashboardAPI.categoryGoodsFavor,
    showLoading: true
  })
}

export function addressGoodsSale() {
  return yRequest.get<IDataType>({
    url: DashboardAPI.addressGoodsSale,
    showLoading: true
  })
}
